import request from '@/utils/request'
// 分页查询
export function page(query) {
  return request({
    url: '/business/goodsType/page',
    method: 'post',
    data: query
  })
}

// 查询参数详细
export function getById(id) {
  return request({
    url: '/business/goodsType/' + id,
    method: 'get'
  })
}
// 查询参数详细
export function getCurOrderView() {
  return request({
    url: '/business/goodsType/getCurOrderView',
    method: 'get'
  })
}
// 新增
export function add(data) {
  return request({
    url: '/business/goodsType/add',
    method: 'post',
    data: data
  })
}
// 删除参数配置
export function deleteById(data) {
  return request({
    url: '/business/goodsType/delete',
    method: 'delete',
    data
  })
}

// 查询类型
export function getType(data) {
  return request({
    url: '/business/goodsType/allType',
    method: 'POST',
    data
  })
}

// 新增或添加
export function update(data) {
  return request({
    url: '/business/goodsType/update',
    method: 'post',
    data: data
  })
}